package com.pengshiyu.service.impl;

import com.pengshiyu.dao.UserDao;
import com.pengshiyu.service.UserService;
import com.pengshiyu.vo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public List<User> list() {
        return userDao.list();
    }

    public User detail(int id) {
        return userDao.detail(id);
    }

    public int delete(int id) {
        return userDao.delete(id);
    }

    public int update(User user) {
        return userDao.update(user);
    }

    public int insert(User user) {
        return userDao.insert(user);
    }
}
